# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
 
pkgname=graphene
pkgver=1.10.6
pkgrel=1
pkgdesc="A thin layer of graphic data types"
url="https://ebassi.github.io/graphene/"
arch=(x86_64)
license=(MIT)
makedepends=(git gtk-doc gobject-introspection meson glib2)
checkdepends=(python-gobject python-tappy)
_commit=01c1b63e98c9191093880919fe6a8c4327515756  # tags/1.10.6^0
source=("git+https://github.com/ebassi/graphene#commit=$_commit"
        "git+https://github.com/ebassi/mutest")
sha256sums=('SKIP'
            'SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd $pkgname

  git submodule init
  git config --local submodule.subprojects/mutest.url "$srcdir/mutest"
  git submodule update
}

build() {
  arch-meson $pkgname build \
    -D gtk_doc=true \
    -D installed_tests=false
  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  depends=(libg{lib,object}-2.0.so)
  provides=(libgraphene-1.0.so)

  DESTDIR="$pkgdir" meson install -C build
  install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 $pkgname/LICENSE.txt
}

# vim:set sw=2 et:
